<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>玩家统计-玩家累计在线TOP20</title>
        <link href="/majiang/Public/admin/css/style.css" rel="stylesheet" type="text/css" />
        <script type="text/javascript" src="/majiang/Public/admin/js/jquery.js"></script>
		<script type="text/javascript" src="/majiang/Public/echarts/echarts-all.js"></script>

		<script type="text/javascript" src="/majiang/Public/My97DatePicker/WdatePicker.js"></script>
    </head>

    <body>

        <div class="place">
            <span>位置：</span>
            <ul class="placeul">
                <li><a href="<?php echo U('index/welcome');?>">首页</a></li>
                <li><a href="<?php echo U('userinfo/userleijitopinfo');?>">玩家累计在线TOP20</a></li>
            </ul>
        </div>

        <div class="formbody">                     
            <form name="seachform" id="seachform" action="<?php echo U('userinfo/userleijitopinfo');?>" method="post">
                <ul class="seachform">		

					<li><label>玩家名称</label><input name="info[keyword]" id="keyword" value="<?php echo ($keyword); ?>" type="text" class="scinput" /></li>	
					<li><label>累计在线时间</label>
                    <input name="info[keyword1]" id="keyword1" value="<?php echo ($keyword1); ?>" type="text" class="scinput" /></li>
                    <li><label>&nbsp;</label><input name="" type="submit" class="scbtn" value="查询"/></li>
                </ul>
            </form>

            <div id="mychart" style="width: 100%;height:600px;"></div>
        </div>
    </body>
	<script>
		var option = {
			title : {
				text: '<?php echo ($title); ?>',
				x: 'center'
			},
			tooltip : {
				trigger: 'axis'
			},
			xAxis : [
				{
					type : 'category',
					boundaryGap : false,
					data : <?php echo ($daylist); ?>,
					axisLabel : {
						interval: 0,
						margin: 5,
						show: true,
						rotate: 45,
						textStyle:{
							color: '#000'
						}
					}
				}
			],
			yAxis : [
				{
					type : 'value',
					axisLabel : {
						formatter: '{value}天'
					}
				}
			],
			grid: { // 控制图的大小，调整下面这些值就可以，
              x: 100,
              x2: 60,
              y2: 220// y2可以控制 X轴跟Zoom控件之间的间隔，避免以为倾斜后造成 label重叠到zoom上
           },
			series : [
				{
					name:'访问人数',
					type:'line',
					smooth: true,
					itemStyle : {
						normal: {
							label : {
								show: true,
								formatter:function(params){
									return params['value']+"天";
								},
								textStyle: {
									fontSize:14,
									color:"red"
								}
							}
						}
					},
					data:<?php echo ($infolist); ?>,
					/*markPoint : {
						data : [
							{type : 'max', name: '最大值'},
							{type : 'min', name: '最小值'}
						]
					},
					markLine : {
						data : [
							{type : 'average', name: '平均值'}
						*/
				}
			]
		};

		// 基于准备好的dom，初始化echarts实例
		var echartsobj = echarts.init(document.getElementById('mychart'));
		// 使用刚指定的配置项和数据显示图表。
		echartsobj.setOption(option);
	</script>
</html>